import java.util.Scanner;
import java.util.Arrays;
public class LongNum {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            String s = scanner.next();
            char[] arr = new char[s.length()];
            for (int i = 0; i < s.length(); i++) {
                arr[i] = s.charAt(i);
            }
            int i = 0;
            //最长字符串长度
            int max = 0;
            //计数
            int count = 0;
            //存放最长数字串数组
            char[] num = new char[arr.length];
            while(i < arr.length) {
                while(Character.isDigit(arr[i])) {
                    //防止数组越界
                    if(i == arr.length-1) {
                        if(Character.isDigit(arr[arr.length-1])) {
                            count++;
                            i++;
                        }
                        break;
                    }
                    count++;
                    i++;
                }
                if(count == 0) {
                    i++;
                }

                if(count != 0) {
                    //count大于最大数字串长度
                    //将数字串放入数组
                    if(count > max) {
                        int n = 0;
                        for (int j = i-count; j < i; j++) {
                            num[n] = arr[j];
                            n++;
                        }
                        max = count;
                    }
                    count = 0;
                }
            }
            //此时num存放最长字串
            for (int j = 0; j < max; j++) {
                System.out.print(num[j]);
            }
        }
}
